-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Enhance the pipeline with git diff
method
#4737
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional changes:
- README: modify the documentation badge
Question:
- If the pipeline is run on master branch (post PR merge), what will the diff stage do? Will it skip the pipeline?
Thank you for reviewing!
I think the documentation badge in README seems fine, should we add badge for main pipeline. Or did I misunderstand your change request?
It's certainly a problem for running on master.I tested direct push using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far looks good to me. What's the plan here @ueqri ?
Sorry for replying so late. I think this enhancement is ready for further developments, e.g. enabling CUDA build on CI(GSoC 2021 Project), integrating clang-tidy and sanitizers for CI(#4629), separating build and test as different stages(#3947), etc. And I plan to add a documentation as descriptions about CI structure in |
Sounds good to me. Could you clean up the code, add comments, etc. if needed and ping again (or asap if not needed) for the review? |
Thanks for your kind help! I would do it soon. 😀 |
I think it's ready for 🚀 . And we could update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding overall structure, I see 2 git diff stages. I have some questions on which I need some clarification:
- Could we have a single git diff stage and set the variables there?
- What's the benefit of using pipeline trigger compared to just having them as different stages, included from a separate file? (Since GCC -> generate doc + tutorials is 100% assured)
@@ -12,7 +12,10 @@ trigger: | |||
- README.md | |||
- CHANGES.md | |||
- CONTRIBUTING.md | |||
# add more exclude rules, e.g. .ci, .dev, .github | |||
- .ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ci and .github can mean change in the pipeline. We want to run pipelines in those cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the mistake, I would fix it.
Regarding the svg image, thoughts on using something like PlantUML? Sample code + image here |
Thank you for your kind review!
In the latest commit, two git diff stages are separated to two pipelines(main & docs pipelines). But sharing variables across pipelines in Azure isn't well implemented according to the official documents. If we want to do this, we need a variable groups which can't be created in YAML. Reference. So could we just keep the duplicate until we find a better way to address the issue?
Although introducing another pipelines may be not a good choice for Azure Ops, pipeline trigger is much smoother to maintain the CI than the flow-control methods for stages or jobs. The stages are mostly supposed to run sequentially (run only once, only after certain stage completes), depending on the position or specific parameter in YAML. So the control of docs stages (without pipeline trigger) will be quite tough. The detailed discussion is as follows. The trigger for docs stages are only for two reasons:
Here are some relevant solutions:
Therefore, I think pipeline trigger is a better tool to carry these complex flow-control tasks.
Thanks for your advice! 😀 I'd like to try the UML form, which is more logic, although the previous Draw.io is easy to create and drag. |
Thanks, your reasoning is quite solid. The PR looks good to me except the image (text preferred) |
Summary
This PR mainly introduces

git diff
and adds a new main pipeline for current CI, as an extension of the discussions in #4715.Blow are my ideas of new structure of CI:
To control the CI workflow better and make the structure more perspicuous, I add a main pipeline to:
Pros
git diff
script than using Azure path filter beforeCons
Test
I test four cases by push to branch directly or start a PR from another user's branch to my test branch
test-CI-features
(with minimal CI). The features work successfully! Here are the results:Details about experiment result
Cases
Test push trigger
Test PR trigger
PS
For exclude rules, it's a bit hard to separate the path-filter(a part of Azure YAML schema) and the diff-exclude-rules to one place. So as a second-best solution to reduce the complexity, I pick up the diff-exclude-rules to the head of the script lines, and add comments to attract attention in YAML file.